
import http from '../utils/request.js'

// 获取相机列表
export function getCameraList(params) {
  return http('/api/Camera/GetCamera', {
    method: 'POST',
    params: params,
  });
}
// 获取供应和用料单位
export function getCompanyList(params) {
  return http('/api/Guest/GetGuestList', {
    method: 'POST',
    params: params,
  });
}
//获取材料信息
export function getMaterialList(params) {
  return http('/api/Material/GetMaterialList', {
    method: 'POST',
    params: params,
  });
}
export function getDeductRatio(params) {
  return http('/api/MaterialGuest/GetMaterialInfo', {
    method: 'POST',
    params: params,
  });
}
// 获取料仓信息
export function getStockList(params) {
  return http('/api/Stock/GetStockList', {
    method: 'POST',
    params: params,
  });
}
// 获取工号信息
export function getJobNumberList(params) {
  return http('/api/Wbs/GetWbsList', {
    method: 'POST',
    params: params,
  });
}
// 获取劳务队伍信息     
export function getLabourList(params) {
  return http('/api/Labour/GetLabourList', {
    method: 'POST',
    params: params,
  });
}
// 获取物联网是否在线
export function singlarOnline(params){
  return http('/api/IOTHub/DeviceisOffline', {
    method: 'POST',
    params: params,
  });
}
// 添加过磅信息(重车过磅)
export function addHeavyInfo(params){
  return http('/api/Yield/AddYield_Iot', {
    method: 'POST',
    params: params,
  });
}
//webscoket 连接
export function connectSinglar(){
  return http('/api/Chat/negotiate?clientProtocol=1.5&connectionData=[{"name":"Chat"}]&_='+Date.now(), {
    method: 'get',
  });
}
// 判断汽车状态
export function carStatus(params) {
  return http('/api/Yield/GetYieldStatu_Iot', {
    method: 'POST',
    params: params,
  });
}
// 解除报警
export function stopErrorWaning(params) {
  return http('/api/IOTHub/SetDevPropsForIOT', {
    method: 'POST',
    params: params,
  });
}
// 获取上一次出场时间
export function getCarLastTime(params) {
  return http('/api/Yield/GetLastYieldTime', {
    method: 'POST',
    params: params,
  });
}
//打印
export function getPrintData(params) {
  return http('/api/IOTHub/TopicAction', {
    method: 'POST',
    params: params,
  });
}
//获取进出场时间间隔
export function getTimeSplit(params) {
  return http('/api/Yield/GetTime', {
    method: 'POST',
    params: params,
  });
}
// 上磅下磅
export function handlePoleChange(params) {
  return http('/api/IOTHub/TopicAction', {
    method: 'POST',
    params: params,
  });
}


